C (230/254)

From:Allan Odgaard
Date:05 Apr 00 at 22:23:35
Subject:Re: Transparenz

Hello Ren�, you're on the air with Doctor Love, so speak your problem...

> I have a picture in my window background. But i cant see this
> on the Gadget position.
> I like i can see 50% my gadget and 50% the picture.
> But i can't create a transparenz :(

Well, for this to happen you need to blend the two images yourself.

A naive approach is to store the picture in one 24 bit rgb buffer and divide
each value by 2, do the same for the gadget image and add these two buffers
together. Now move the pixels to the screen, perhaps with some quantization if
you aren't running on a high colour screen.

If your gadget imagery has transparency then the pixels in the first buffer,
corresponding to the transparency mask, shouldn't be divided by 2.

If you know that you'll always work on a clut-screen then you could instead
create some plaette lookup tables to avoid working with 24 bit buffers and
quantization...

If you download Imagemanager.library from my homepage then there's an example
named AlphaBlend, this will load an image and blend it together with the
workbench screen (using a 'sinus spot' as alpha-channel) maybe this is of use
to you...

Regards Allan

------------------------------------------------------------------------
PERFORM CPR ON YOUR APR!
Get a NextCard Visa, in 30 seconds! Get rates as low as
0.0% Intro or 9.9% Fixed APR and no hidden fees.
Apply NOW!
http://click.egroups.com/1/2121/1/_/451227/_/954970367/
------------------------------------------------------------------------